import type { RouteRecordRaw } from 'vue-router';
import RouterView from '@/layout/routerView/index.vue';
import menu from '@/assets/menuIcon/menu8.png';

const moduleName = 'partner';

const routes: Array<RouteRecordRaw> = [
  {
    path: '/partner',
    name: moduleName,
    component: RouterView,
    redirect: '/partner/customer',
    meta: {
      title: '合作伙伴',
      icon: menu,
    },
    children: [
      {
        path: 'customer',
        name: `${moduleName}-customer`,
        component: () => import('@/views/partner/customer/index.vue'),
        meta: {
          title: '客户管理',
        },
      },
      {
        path: 'supplier',
        name: `${moduleName}-supplier`,
        component: () => import('@/views/partner/supplier/index.vue'),
        meta: {
          title: '供应商管理',
        },
      },
    ],
  },
];

export default routes;
